package com.example.demo01.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName TestController
 * @Description
 * @Author zhangsw
 * @Date 2021/10/30 21:27
 * @Version 1.0
 */
@RestController
@RequestMapping("test")
public class TestController {

    @PostMapping("hello")
    public Map<String, Object> hello(@RequestBody Map<String, Object> param) {
        Map<String, Object> map = new HashMap<>();
        map.put("code", 200);
        map.put("data", param);
        return map;
    }
}
